<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="div垂直居中,div文字垂直居中,div中input垂直居中,JS特效代码" />
<meta name="description"
	content="DIV实现input垂直居中，兼容IE6、IE7、IE8、Firefox、Safari。更多代码请访问懒人图库JS代码频道。" />
<style type="text/css">
#searchbox {
	background: #c0c0c0; width : 1120px;
	height: 54px;
	margin: 5px auto;
	display: table;
	*position: relative;
	overflow: hidden;
	width: 720px;
}

.searchboxSwap1 {
	vertical-align: middle;
	display: table-cell;
	*position: absolute;
	*top: 50%;
}

.searchboxSwap2 {
	*position: relative;
	*top: -50%;
	float: right;
	padding-right: 10px;
}
</style>
<title>DIV实现input垂直居中 兼容IE6、IE7、IE8、Firefox、Safari_懒人图库</title>
</head>

<body>
	<div id="searchbox">
		<div class="searchboxSwap1">
			<div class="searchboxSwap2">
				<input name="textfield" type="text" size="30" />
			</div>
			<div class="searchboxSwap2">
				<input name="textfield" type="text" size="30" />
			</div>
		</div>
	</div>
</body>
</html>